package org.cornland.systemWarning.service.impl;

import org.cornland.systemWarning.model.PtInstance;
import org.cornland.systemWarning.mapper.PtInstanceMapper;
import org.cornland.systemWarning.service.PtInstanceService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import lombok.extern.slf4j.Slf4j;

import java.util.List;

/**
 * <p>
 * 平台瞬量错误日志表 服务实现类
 * </p>
 *
 * @author Hawk Tang
 * @since 2021-10-13
*/


@Service
@Slf4j
public class PtInstanceServiceImpl extends ServiceImpl<PtInstanceMapper, PtInstance> implements PtInstanceService {

   @Autowired
   private PtInstanceMapper ptInstanceMapper;

   public PtInstance selectByPrimaryKey(Integer id){
        PtInstance ptInstance = ptInstanceMapper.selectById(id);
        return ptInstance;
   }

   public List<PtInstance> selectAll(){
        List<PtInstance> ptInstanceList = ptInstanceMapper.selectList(null);
        return ptInstanceList;
   }

   public Integer insert(PtInstance ptInstance){
        int result = ptInstanceMapper.insert(ptInstance);
        return result;
   }

   public Integer updateByPrimaryKey(PtInstance ptInstance){
        int result = ptInstanceMapper.updateById(ptInstance);
        return result;
   }

   public Integer deleteByPrimaryKey(Integer id){
        int result = ptInstanceMapper.deleteById(id);
        return result;
   }







}